#ifndef __UtilityAssert_h__
#define __UtilityAssert_h__

#ifdef _DEBUG
#define ASSERT(b, message)	if(!(b)) throw new Utility::Exception(message);
#else
#define ASSERT(b, message)
#endif

#include "Utility.h"

namespace Utility
{
	class Exception
	{
		public:
			inline Exception(const char *message)
				: mMessage(copyStr(message))
			{}
			inline ~Exception()
			{
				delete [] mMessage;
			}
			inline const char* getMessage() const	{return mMessage;}
		private:
			const char*	mMessage;
	};
}

#endif // __UtilityAssert_h__
